
/**
 * stores and handles DOT effects
 * @author paul
 *
 */
public class DOTeffect implements IPlayerEffect 
{

	private double damage;
	private double reduce;
	
	public DOTeffect(int damage, double reduce)
	{
		this.damage = damage;
		this.reduce = reduce;
	}
	/**
	 * returns the damage produced by the DOT effect
	 * @return
	 */
	public int getDamage()
	{
		return (int) Math.ceil(this.damage);
	}
	
	/**
	 * reduces damage at end of each turn 
	 */
	public void endTurn() 
	{
		this.damage = this.damage - this.reduce;
		if (this.damage < 0)
		{
			this.damage = 0;
		}
	}

}
